package com.profile.validation;

import org.springframework.stereotype.Component;

import com.profile.domain.Profile;

import org.springframework.validation.Errors;

@Component
public class ProfileValidation {

	
	public void validate(Profile profile , Errors errors){
		
		if ( profile.getSkill() == null || profile.getSkill().size() == 0 ) {
			errors.rejectValue("skill", "required.skill");
		}
		
	}
	
}
